﻿@using ExampleWebApplication.Properties
@{
    ViewBag.Title = "NHibernate Examples";
}

<h2>NHibernate Examples</h2>

<button id="openAllButton">Open All</button>

<ul id="examplesLinks">
    <li>@Html.ActionLink(NHibernateStrings.Example1, "CustomAjaxBinding")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example2, "CustomServerBinding")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example3, "TwoQueriesToCountAndList")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example4, "NHibernateQueryOver")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example5, "MappingTechniques")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example6, "AggregatesServerSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example7d1, "AggregatesClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example7d2, "AggregatesClientSideNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example8d1, "DirectUsageOfTEntity")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example8d2, "DirectUsageOfTEntityNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d1, "CustomAggregatesFunctionsClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d2, "CustomAggregatesFunctionsInlineClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d3, "CustomAggregatesFunctionsIgnoreGroupAggregatesClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d4, "CustomAggregatesFunctionsNHibernateClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d5, "CustomAggregatesFunctionsNHibernateInlineClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d6, "CustomAggregatesFunctionsNHibernateIgnoreGroupAggregatesClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example9d7, "CustomAggregatesFunctionsInlineDirectUsageOfTEntityClientSide")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example10d1, "UsingProjections")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example10d2, "UsingProjectionsNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example11d1, "BooleanSubstitute")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example11d2, "BooleanSubstituteNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example12d1, "ValueResolver")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example12d2, "ValueResolverNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example13d1, "ORMIntegration")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example13d2, "ORMIntegrationNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d1, "FilteringNullableValues")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d2, "FilteringNullableValuesNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d3, "FilteringWithNullAliases")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d4, "FilteringWithNullAliasesNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d5, "FilteringWithNullSubstitutes")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example14d6, "FilteringWithNullSubstitutesNHibernate")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example15d1, "CaseInsensitiveSearch")<br/><br/></li>
    <li>@Html.ActionLink(NHibernateStrings.Example15d2, "QueryOverCaseInsensitiveSearch")<br/><br/></li>
</ul>


@section customScripts
{
    <script>

        $(document).ready(function () {
            $('#examplesLinks li a').each(function () {
                $(this).attr('target', '_blank');
            });
        });

        $("#openAllButton").click(function () {
            $('#examplesLinks li a').each(function () {
                $(this)[0].click();
                //window.open($(this).prop('href'), '_blank');
            });
        });
        
    </script>
}


